package com.mallcloud.mall.common.core.constant.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * 流程状态
 */
@Getter
@AllArgsConstructor
public enum TaskStatusEnum {

	UNSUBMIT("0", "未提交"),
	CHECK("1", "审核中"),
	COMPLETED("2", "已完成"),
	OVERRULE("9", "驳回")
	;

	private final String status;
	private final String description;

	public static String getDecs(String status) {
		return Arrays.stream(values()).filter(x -> x.getStatus().equals(status)).findFirst().get().getDescription();
	}
}
